<form method="post" action="" class="pageForm -validate">
<div class="pageContent">
    <div class="pageFormContent" layoutH="50">
        <fieldset>
        <!-- <legend><@label key='form_description.C'>表单信息</@label></legend> -->
        <dl>
            <dt><@label key='productionOrderNum.C,colon'>生产订单编号：</@label></dt>
            <dd><input type="text" name="productionOrderNum" class="" value="${productionOrder.productionOrderNum!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='orderStatusECode.C,colon'>订单状态：</@label></dt>
            <dd><select name="statuseCode" disabled="disabled">
                    <option value="" ><@label key='all.C'>所有</@label></option>
                    <#if orderStatusECode??>
                        <#list orderStatusECode as ecode>
                            <option value="${ecode.eCode!''}" <#if productionOrder.statuseCode?? && productionOrder.statuseCode == ecode.eCode> selected</#if> >${ecode.eCodeText!''}</option>
                        </#list>
                    </#if>
                </select>
            </dd>
        </dl>
        <dl>
            <dt><@label key='orderType.C,colon'>订单类型：</@label></dt>
            <dd><input type="text" name="orderTypeCode" class="" value="${productionOrder.orderTypeText!''}" readonly="readonly"/>
            </dd>
        </dl>
        <dl>
            <dt><@label key='materialCode.C,colon'>物料编号：</@label></dt>
            <dd>
                <input name="materialCode" value="" type="hidden"/>
                <input class="" name="materialLookup.materialCode" type="text" postField="componentText" value="${productionOrder.materialCode!''}" readonly="readonly" />
            </dd>
        </dl>
        <dl>
            <dt><@label key='materialText.C,colon'>物料名称：</@label></dt>
            <dd><input name="materialLookup.materialText" type="text" value="${productionOrder.materialText!''}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='process.C,colon'>工艺：</@label></dt>
            <dd><select id="pp_processCode" name="processCode" class="" disabled="disabled">
                    <option value="${productionOrder.processCode!''}" selected>${productionOrder.processText!''}</option>
                </select>
            </dd>
        </dl>
        <dl>
            <dt><@label key='cmprocessrev.C,colon'>工艺版本：</@label></dt>
            <dd><input id="pp_processRev" name="processRev" value="${productionOrder.processRev!''}"  readonly />
            </dd>
        </dl>
        <dl>
            <dt><@label key='plannedQuantity.C,colon'>计划数量</@label></dt>
            <dd><input type="text" name="plannedQuantity" class=" number" readonly="readonly" value="${productionOrder.plannedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='releasedQuantity.C,colon'>已下达数量</@label></dt>
            <dd><input type="text" name="releasedQuantity" class=" number" readonly="readonly" value="${productionOrder.releasedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='requirementDate.C,colon'>需求日期：</@label></dt>
            <dd><input type="text" name="requirementDate" class="" readonly="readonly" value="${(productionOrder.requirementDate?string('yyyy-MM-dd'))?if_exists}"/></dd>
        </dl>
        <dl>
            <dt><@label key='productionlotNum.C,colon'>生产批次号：</@label></dt>
            <dd><input type="text" name="productionlotNum" value="${productionOrder.productionlotNum!''}" readonly="readonly" /></dd>
        </dl>
        <dl>
            <dt><@label key='plannedstartDateTime.C,colon'>计划开始时间：</@label></dt>
            <dd><input type="text" name="plannedstartDateTime" class="" value="${(productionOrder.plannedstartDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}"
             readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='plannedendDateTime.C,colon'>计划结束时间：</@label></dt>
            <dd><input type="text" name="plannedendDateTime" class="" value="${(productionOrder.plannedendDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='actualstartDateTime.C,colon'>实际开始时间：</@label></dt>
            <dd><input type="text" name="actualstartDateTime" class="" value="${(productionOrder.actualstartDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='actualendDateTime.C,colon'>实际结束时间：</@label></dt>
            <dd><input type="text" name="actualendDateTime" class="" value="${(productionOrder.actualendDateTime?string('yyyy-MM-dd HH:mm:ss'))?if_exists}" readonly="readonly"/></dd>
        </dl>
        <dl>
            <dt><@label key='completedQuantity.C,colon'>完工数量：</@label></dt>
            <dd><input type="text" name="completedQuantity" class=" number" readonly="readonly" value="${productionOrder.completedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='scrappedQuantity.C,colon'>报废数量：</@label></dt>
            <dd><input type="text" name="scrappedQuantity" class=" number" readonly="readonly" value="${productionOrder.scrappedQuantity!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='repairQuantity.C,colon'>返修数量：</@label></dt>
            <dd><input type="text" name="repairQuantity" class="number" readonly="readonly" value="${productionOrder.repairQuantity!''}"/></dd>
        </dl>
         <dl>
            <dt><@label key='customer.C,colon'>客户：</@label></dt>
            <dd><input type="text" name="customer"  readonly="readonly" value="${productionOrder.customer!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='customerOrder.C,colon'>客户订单：</@label></dt>
            <dd><input type="text" name="customerOrder"  readonly="readonly" value="${productionOrder.customerOrder!''}"/></dd>
        </dl>
        <dl>
            <dt><@label key='priority.C,colon'>优先级：</@label></dt>
            <dd><input type="text" name="priority" readonly="readonly" value="${productionOrder.priority!''}"/></dd>
        </dl>
         <dl>
            <dt></dt>
            <dd>
                <label style="width: 80px;"><input disabled="disabled" type="checkbox" name="operationScheduleFlag" value="1"
                <#if (productionOrder.operationScheduleFlag)?? && (productionOrder.operationScheduleFlag == 1)>checked="true"</#if>>
                <@label key="operationScheduleFlag.C">工序派工</@label></label>
            </dd>
        </dl>
        </fieldset>
        <#if productionOrder??>
            <#assign createInfo=productionOrder/> 
            <#include "/common/createInfo_width.html">
        </#if>
    <div class="tabs">
        <div class="tabsHeader">
            <div class="tabsHeaderContent">
                <ul>
                    <li id="attachment" data-selectedid="productionOrder_attachment" class="exerInputS"><a href="javascript:;" id="select1"><span><@label key='attachment.C'>附件</@label></span></a></li>
                    <li id="component" data-selectedid="productionControl" class="exerInputS"><a href="javascript:;" id="select2"><span>订单详情</span></a></li>
                </ul>
            </div>
        </div>
        <div class="tabsContent" style="height:180px">
            <div>
               <table class="table canopration border" layoutH="410" id="productionAttachMentTable" style="width: 100%;">
                    <thead>
                        <tr>
                            <th width="100px"><@label key='fileName.C'>文件名称</@label></th>
                            <th width="100px"><@label key='fileSize.C'>文件大小(bytes)</@label></th>
                            <th width="50px"><@label key="opera.C">操作</@label></th>
                        </tr>
                    </thead>
                    <tbody>
                        <#if productionOrder?? && productionOrder.attachment??>
                        <#list productionOrder.attachment as attachment>
                            <tr id="productionAttachment_${attachment.id!''}">
                                <td>${attachment.fileName!''}</td>
                                <td>${(attachment.fileSize/1024)?int} kb</td>
                                <td>
                                    <a title="<@label key='download.B'>下载</@label>" target="dwzExport" class="btnAttach" href="${rc.getContextPath()}/manage/common/downloadAttachement?attachmentCode=${attachment.attachmentCode!''}&fileName=${attachment.fileName!''}"></a>
                                </td>
                            </tr>
                        </#list>
                    </#if>
                    </tbody>
                </table>
            </div>
            <div>
            <table class="table border" width="100%" layoutH="410">
            <thead>
                <tr>
                    <th width="40"><@label key="serialNumber.C">序号</@label></th>
                    <th width="100"><@label key='productionControlNum.C'>生产管理号</@label></th>
                    <th width="80"><@label key='orderStatusECode.C'>订单状态</@label></th>
                    <th width="100"><@label key='workCenter.C,code.C'>工作中心编号</@label></th>
                    <th width="100"><@label key='workCenter.C,description.C'>工作中心描述</@label></th>
                    <th width="80"><@label key='plannedQuantity.C'>计划数量</@label></th>
                    <th width="80"><@label key='completedQuantity.C'>完工数量</@label></th>
                    <th width="80"><@label key='scrappedQuantity.C'>报废数量</@label></th>
                    <th width="80"><@label key='repairQuantity.C'>返修数量</@label></th>
                    <th width="100"><@label key='actualstartDateTime.C'>实际开始时间</@label></th>
                    <th width="100"><@label key='actualendDateTime.C'>实际结束时间</@label></th>
                </tr>
            </thead>
            <tbody>
            <#if orderDetails??><#if (orderDetails?size>0 )>
                <#list orderDetails as detail>
                <tr>
                    <td>${detail_index + 1}</td>
                    <td>${detail.productionControlNum!''}</td>
                    <td><#if controlStatusECode??>
                        <#list controlStatusECode as ecode>
                            <#if detail.statuseCode == ecode.eCode>${ecode.eCodeText!''}<#break></#if>
                        </#list>
                        </#if>
                    </td>
                    <td>${detail.workCenterCode!''}<input type="hidden" name="detail[${detail_index}].workCenterCode" value="${detail.workCenterCode!''}"/></td>
                    <td>${detail.workCenterText!''}</td>
                    <td>${detail.plannedQuantity!''}</td>
                    <td>${detail.completedQuantity!''}</td>
                    <td>${detail.scrappedQuantity!''}</td>
                    <td>${detail.repairQuantity!''}</td>
                    <td>${(detail.actualstartDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                    <td>${(detail.actualendDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                </tr>
            </#list>
            </#if>
            <#else>
            <tr>
                    <td colspan="11" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
            </tr>
            </#if>
            </tbody>
            </table>
            </div>
        </div>
        <div class="tabsFooter">
                <div class="tabsFooterContent"></div>
        </div>
    </div>
</div>
<div class="formBar">
    <ul>
        <li>
            <div class="buttonActive"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
        </li>
    </ul>
</div>
</div>
</form>
